<?php
/**     
  *
  * Copyright (c) 2009, Persistent Systems Limited
  *
  * Redistribution and use, with or without modification, are permitted 
  *  provided that the following  conditions are met:
  *   - Redistributions of source code must retain the above copyright notice, 
  *     this list of conditions and the following disclaimer.
  *   - Neither the name of Persistent Systems Limited nor the names of its contributors 
  *     may be used to endorse or promote products derived from this software 
  *     without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 
  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
/**
 * Class Scop For Get /Set Scop propoerties
 * @access public
 */
class Scope
{
   /**
	* @access public
	* @var string
	*/
	public static $credentialType ;	

   /**
	* @access private
	* @var string
	*/
	private $_issuerName;

   /**
	* @access private
	* @var string
	*/
    private $_appliesTo;

   /**
	* @access private
	* @var string
	*/
    private $_issuerSecret;
	
   /**
	* @access private
	* @var string
	*/
	private $_serviceNamespaceDomain;  

   /**
	* @access private
	* @var string
	*/
	private $_serviceURI;  

   /**
	* @access private
	* @var string
	*/
	private $_simpleWebToken;  

	/**
	 * Custom claims collection
	 */
	private $_customClaims;

    /**
      * Sets the credentialType variables
      * @param string $credentialType 	       
      */	
    public function __construct($credentialType) 
    {
        Scope::$credentialType = $credentialType;
        $_customClaims = array();
    }
	
	/**
	* Gets the Service URI 
	* @return Service URI
	*/ 
	public function getIssuerName()
	{
		return $this->_issuerName;
	}
	
	/**
	* Gets the Issuer Secret key
	* @return Issuer Secret key
	*/
	public function getIssuerSecret()
	{
		return $this->_issuerSecret;
	}

	/**
	* Gets the AppliesTo
	* @return AppliesTo
	*/
	public function getAppliesTo()
	{
		return  $this->_appliesTo;
	}
	
	/**
	* Gets the Service Namespace Domain
	* @return ServiceNamespaceDomain
	*/
	public function getServiceNamespaceDomain()
	{
		return $this->_serviceNamespaceDomain;
	}

	/**
	* Gets the Simple Web Token
	* @return Simple Web Token
	*/
	public function getSimpleWebToken()
	{
		return $this->_simpleWebToken;
	}

	/**
	* Gets the Service URI 
	* @return ServiceURI
	*/
	public function getServiceURI()
	{
		return $this->_serviceURI;
	}

 
	/**
	* Sets the Issuer name 
	* @param $issuerName 
	*/
	public function setIssuerName($issuerName)
	{
		$this->_issuerName = $issuerName;
	}
	
	/**
	* Sets the Issuer Secret key 
	* @param $issuerSecret 
	*/
	public function setIssuerSecret( $issuerSecret)
	{
		 $this->_issuerSecret = $issuerSecret;
	}

	/**
	* Sets the AppliesTo   value
	* @param $AppliesTo   
	*/
	public function setAppliesTo($appliesTo)
	{
		$this->_appliesTo = $appliesTo;
	}

	/**
	* Sets the service Namespace Domain
	* @param $serviceNamespaceDomain 
	*/
	public function setServiceNamespaceDomain($serviceNamespaceDomain)
	{
		$this->_serviceNamespaceDomain = $serviceNamespaceDomain;
	}
	
	/**
	* Sets the simple Web Token 
	* @param $simpleWebToken
	*/
	public function setSimpleWebToken($simpleWebToken)
	{
		$this->_simpleWebToken = $simpleWebToken ;
	}
	
	/**
	* Sets the service URI
	* @param $serviceURI
	*/
	public function setServiceURI($serviceURI)
	{
		$this->_serviceURI = $serviceURI;
	}

	public function addCustomInputClaim($type, $value)
	{
		$this->_customClaims[$type] = $value;
	}
	
	public function getCustomInputClaims()
	{
		return $this->_customClaims;
	}
}
?>